/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.notaria.guerrasalas.bc;

import com.notaria.guerrasalas.be.Igv;
import gob.satt.comun.jpa.Command;
import java.util.List;
import javax.persistence.EntityManager;
import oracle.toplink.essentials.config.HintValues;
import oracle.toplink.essentials.config.TopLinkQueryHints;

/**
 *
 * @author Emmanuel
 */
public class ListarIGVCommand implements Command<List<Igv>>{

    @Override
    public List<Igv> execute(EntityManager em) throws Exception {
        List<Igv> lista = null;
        lista = (List<Igv>)em.createNamedQuery("Igv.findAll")
                .setHint(TopLinkQueryHints.REFRESH, HintValues.TRUE)
                .getResultList();
        return lista;
    }

}
